﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAO;
using DVO;

/// <summary>
/// Summary description for BLL_Approve
/// </summary>
public class BLL_Approve : ApproveDataContext
{
	public BLL_Approve()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public int Approve_Insert(int DocumentId,string UserName,int status)
    {
        int Idreturn = 0;
        try
        {
            Idreturn = ins_Approve_InsertUpdate(DocumentId,UserName,status);
        }
        catch (Exception ex)
        {
            Common.WriteLog(ex.Message, ex.StackTrace);
        }
        return Idreturn;
    }

    public List<ins_Approve_SelectUserResult> Approve_SelectUser(int DocumentId)
    {
        List<ins_Approve_SelectUserResult> Objlist = new List<ins_Approve_SelectUserResult>();
        try
        {
            Objlist = ins_Approve_SelectUser(DocumentId).ToList();
        }
        catch (Exception ex)
        {
            Common.WriteLog(ex.Message, ex.StackTrace);
        }
        return Objlist;
    }
}